# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=grokevt
pkgver=122.3f999e7
pkgrel=5
pkgdesc='A collection of scripts built for reading Windows® NT/2K/XP/2K eventlog files.'
url='http://code.google.com/p/grokevt/'
arch=('any')
license=('GPL')
depends=('python2' 'reglookup' 'cpio')
makepdepends=('git')
groups=('blackarch' 'blackarch-forensic')
source=("git+https://github.com/ecbftw/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  make PREFIX="$pkgdir/usr" ETC_PREFIX="$pkgdir/etc/$pkgname" \
    MAN_PREFIX="$pkgdir/usr/share/man" install

  rm -rf "$pkgdir/usr/share/man"
  mv "$pkgdir/usr/share/doc/$pkgname/man" "$pkgdir/usr/share/"
  rm -rf "$pkgdir/usr/share/doc"
}

